<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display"%>
<%@ page contentType="text/html;charset=utf-8"%>
<html>
  <head>
    <!--<meta http-equiv="Content-Type" content="text/html; charset=utf-8">-->
    <title>Usuarios Administradores</title>
    
    <script language="javascript">
       
        function fAceptar(){
          document.frmSelectUser.submit();
        }
        
        function fbuscar(){
          document.frmSelectUser.submit();
        }
        
        function enviar(locacion){
          document.frmSelectUser.action=locacion;
          document.frmSelectUser.submit();
        }
        
        function fvalue(cod, nombre)
        {
          opener.document.frmauditoria.admincodigo.value = cod;
          opener.document.frmauditoria.administrador.value = nombre;
          window.close();
        }
         
    </script>   
  </head>
  <body>
  <link href="<%= request.getContextPath() + "/css/bloques.css" %>" rel="stylesheet" type="text/css">
  <P>&nbsp;</P>
    <P align="center"></P>
    <P align="center" class="titulosenblanco">USUARIOS ADMINISTRADORES</P>
    <form name="frmSelectUser" method="get" action="<%=request.getContextPath()+"/Reportes/ControlAcceso/CASelectUserMain.do"%>">
    <table cellspacing="2" cellpadding="3" border="0" width="60%" align="center">
      <tr>
        <td width="25%" class="celdatabla" align="center">
          <STRONG>Usuario</STRONG>
        </td>
        <td width="75%" align="left">
          <input type="text" class="form"  name="NameUser" maxlength="40" size="20"/>
        </td>
      </tr>
      <tr>
        <td width="25%" height="8" align="right" class="celdatabla">
          <input type="radio" name="find" value="nombre"/>IDENTIFICACION
        </td>
        <td width="75%" height="8" align="center" class="celdatabla">
          <input type="radio" name="find" value="description" checked="checked"/>NOMBRE
        </td>
      </tr> 
      <tr>
        <td width="25%" height="8"></td>
        <td width="75%" height="8"></td>
      </tr>
      <tr>
        <td width="75%" align="center" colspan="2">
          <!--<input type="submit" value="Buscar" language="javascript" onclick="fbuscar"/> -->
          <% String Ruta2 = "'"+request.getContextPath() + "/Reportes/ControlAcceso/CASelectUserMain.do'";%>
          <input type="BUTTON" value="Buscar" language="javascript" onclick="enviar(<%=Ruta2%>)"/>
        </td>
      </tr>
    </table>
    <DIV align="center">
    <logic:present scope="session" name="cUsers"> 
        <table style="form" cellspacing="3" cellpadding="2" border="0" width="60%" align="center">
          <tr>
            <td>
              
              <display:table name="sessionScope.cUsers" class="bordesTable" id="users" style="width:100%">
                
                <display:column property="name" headerClass="headerTable" title="IDENTIFICACION" class="Numero" sortable="false">
                </display:column>
                <display:column property="description" headerClass="headerTable" title="DESCRIPCION" class="Numero" sortable="false">
                </display:column>
                <display:column headerClass="headerTable" title="SELECCIONAR" class="Numero" sortable="false">
                   <bean:define id="nombre" name="users" property="name"></bean:define>
                   <bean:define id="codigo" name="users" property="code"></bean:define>
                   <input align="middle" type="radio"  name="seleccionar" onclick="fvalue('<%=codigo%>','<%=nombre%>')"/>
                </display:column>
                
              </display:table>
            </td>
          </tr> 
          
        </table>
    </logic:present>
    <logic:notPresent scope="session" name="cUsers">
    </logic:notPresent>
    </DIV>
    </form>
  </body>
</html>
